package com.gm.wholesale.module.tenxunQcloud.model;

import android.util.ArrayMap;

import com.gm.commonlib.base.baseBean.DataResp;
import com.gm.commonlib.network.BaseHttpObserver;
import com.gm.commonlib.network.HttpClient;
import com.gm.commonlib.network.HttpServicesHolder;
import com.gm.wholesale.module.tenxunQcloud.api.ITenXunApi;
import com.gm.wholesale.module.tenxunQcloud.bean.TenXunSdkKeyBean;

import io.reactivex.Observable;

public class TenXunYunModel {
    public static void getTenXunYunKey(String key,
                                       BaseHttpObserver<DataResp<TenXunSdkKeyBean>> beanBaseHttpObserver) {
        HttpClient.sendRequest(null, new HttpServicesHolder<ITenXunApi, DataResp<TenXunSdkKeyBean>>() {
            @Override
            public Observable<DataResp<TenXunSdkKeyBean>> getHttpObservable(ITenXunApi instance) {
                ArrayMap<String, Object> data = new ArrayMap<>();
                data.put("key", key);
                return instance.getTenXunAppKey(data);
            }
        }, beanBaseHttpObserver);
    }

}
